#@layoutT("销售月报表")
#define main()
#@formStart()

#@queryStart('销售月报表')
<input type="search" id="month" name="month" autocomplete="off" class="layui-input" placeholder="请选择月份"/>
#@queryEnd()


#@formEnd()

<div class="layui-row  f-index-toolbar">
    <div class="layui-col-xs12">
        <table id="maingrid" lay-filter="maingrid"></table>
    </div>
</div>

#end
#define layuiFunc()
    laydate.render({
        elem: '#month',
        type: 'month'
    });
#end

#define js()
<!-- 分页表格 -->
<script type="text/javascript">

    $(function(){
        getList();
    })
	
    function getList(){
        gridArgs.title='销售月报表';
        gridArgs.dataId='id';
        gridArgs.gridDivId ='maingrid';
        initGrid({id : 'maingrid'
            ,elem : '#maingrid'
            ,cellMinWidth: 80
            ,cols : [ [
                {title: '主键',field : 'id',width : 35,checkbox : true},
                {title:'序号',type:'numbers',width:35},
                {title: '销售人', field: 'user_name',sort:true },
                {title: '月份', field: 'cur_month',sort:true},
                {title: '月结金额', field: 'sum_money_1'},
                {title: '现结金额', field: 'sum_money_0'},
                {title: '总金额', field: 'sum_money'},
            ] ]
            ,url:"#(path)/erp/statistics/sell/month/list"
            ,where:{"object":"sys_tree","primaryKey":gridArgs.dataId}
            ,searchForm : 'searchForm'
        },null);
    }

</script>
#end

